// eslint-disable-next-line no-unused-vars
function defineReactive (obj, key, val) {
  if (arguments.length === 2) {
    val = obj[key]
  }
  Object.defineProperty(obj, key, {
    get () {
      console.log('getter函数')
      return val
    },

    set (newVal) {
      console.log('setter函数')
      val = newVal
    }
  })
}
